﻿<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master"  %>
<%@ Import Namespace="System.Data.SQLite" %>
<%@ Import Namespace="FMWeb.CSCode" %>
<script runat="server">
    protected void Page_Load(object sender, EventArgs e)
    {
    }

    protected void SubmitFeedback(object sender, EventArgs e)
    {
        using (SQLiteConnection c = DBManager.GetDBConnection())
        {
            SQLiteCommand command = new SQLiteCommand("INSERT INTO [Feedback] (Feedback) VALUES (@feedback)", c);
            command.Parameters.AddWithValue("feedback", txt_feedback.Text.ToString());

            c.Open();
            command.ExecuteNonQuery();
        }
    }

</script>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <h2>Submit Feedback</h2>
    <asp:TextBox runat="server" Text="" TextMode="MultiLine" ID="txt_feedback" Width="300" Height="120" />
    <br />
    <asp:Button runat="server" ID="btn_submit" Text="Submit" OnClick="SubmitFeedback" />
</asp:Content>
